﻿

--添加奖惩
CREATE proc [dbo].[proc_Employee_Award_Punish_Create]
(
	@Eid int,
	@AContent nvarchar(MAX),
	@Reason NVARCHAR(MAX),
	@EntryPeople nvarchar(50),
	@EntryTime DATETIME,
	@EName NVARCHAR(20),
	@Cid INT,
	@Temp INT,
	@Did int
)
AS
	DECLARE @UName NVARCHAR(20)
	SET @UName=(SELECT EName FROM Employee WHERE UserName=@EntryPeople)
	IF(@UName is NULL)
	set @UName=@EntryPeople
	insert into Award_Punish(Eid,AContent,EntryPeople,EntryTime,EName,Cid,Did,Temp,Reason)
	values(@Eid,@AContent,@UName,@EntryTime,@EName,@Cid,@Did,@Temp,@Reason)
RETURN 

